package com.scau402.system.service.impl;

import java.util.List;

import com.scau402.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.scau402.system.mapper.WmsInboundOrderMergeMapper;
import com.scau402.system.domain.WmsInboundOrderMerge;
import com.scau402.system.service.IWmsInboundOrderMergeService;

/**
 * 入库单合并Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-26
 */
@Service
public class WmsInboundOrderMergeServiceImpl implements IWmsInboundOrderMergeService 
{
    @Autowired
    private WmsInboundOrderMergeMapper wmsInboundOrderMergeMapper;

    /**
     * 查询入库单合并
     * 
     * @param newOrderId 入库单合并主键
     * @return 入库单合并
     */
    @Override
    public WmsInboundOrderMerge selectWmsInboundOrderMergeByNewOrderId(Long newOrderId)
    {
        return wmsInboundOrderMergeMapper.selectWmsInboundOrderMergeByNewOrderId(newOrderId);
    }

    /**
     * 查询入库单合并列表
     * 
     * @param wmsInboundOrderMerge 入库单合并
     * @return 入库单合并
     */
    @Override
    public List<WmsInboundOrderMerge> selectWmsInboundOrderMergeList(WmsInboundOrderMerge wmsInboundOrderMerge)
    {
        return wmsInboundOrderMergeMapper.selectWmsInboundOrderMergeList(wmsInboundOrderMerge);
    }

    /**
     * 新增入库单合并
     * 
     * @param wmsInboundOrderMerge 入库单合并
     * @return 结果
     */
    @Override
    public int insertWmsInboundOrderMerge(WmsInboundOrderMerge wmsInboundOrderMerge)
    {
        wmsInboundOrderMerge.setTenantId(SecurityUtils.getLoginUser().getTenantId());
        return wmsInboundOrderMergeMapper.insertWmsInboundOrderMerge(wmsInboundOrderMerge);
    }

    /**
     * 修改入库单合并
     * 
     * @param wmsInboundOrderMerge 入库单合并
     * @return 结果
     */
    @Override
    public int updateWmsInboundOrderMerge(WmsInboundOrderMerge wmsInboundOrderMerge)
    {
        return wmsInboundOrderMergeMapper.updateWmsInboundOrderMerge(wmsInboundOrderMerge);
    }

    /**
     * 批量删除入库单合并
     * 
     * @param newOrderIds 需要删除的入库单合并主键
     * @return 结果
     */
    @Override
    public int deleteWmsInboundOrderMergeByNewOrderIds(Long[] newOrderIds)
    {
        return wmsInboundOrderMergeMapper.deleteWmsInboundOrderMergeByNewOrderIds(newOrderIds);
    }

    /**
     * 删除入库单合并信息
     * 
     * @param newOrderId 入库单合并主键
     * @return 结果
     */
    @Override
    public int deleteWmsInboundOrderMergeByNewOrderId(Long newOrderId)
    {
        return wmsInboundOrderMergeMapper.deleteWmsInboundOrderMergeByNewOrderId(newOrderId);
    }
}
